package bite20220320;

public class RecursiveCall {
    public static void printArray(int[] arr,int length){
        if (length < 1){
            return;
        }
        System.out.print(arr[length-1]+" ");
        printArray(arr,--length);
    }
    public static int sumEvery(int n){
        if (n <=9){
            return n%10;
        }
        return n%10 + sumEvery(n/10);
    }
    public static void printNum(int num){
        if (num / 10 ==0){
            System.out.print(num%10);
            return;
        }
        printNum(num/10);
        System.out.print(num%10);
    }
    public static void main(String[] args) {
        int[] arr = {1,1,3,4,5,6,7,3};
        printArray(arr,arr.length);
    }
}
